<%-- 
    Document   : UserSearchResult
    Created on : 2020-4-21, 19:58:54
    Author     : zhang
--%>

<%@page import="java.util.List"%>
<%@page import="entity.Member"%>
<%@page import="dao.MemberDao"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>用户搜索结果</h1>
        <div style="position:absolute;left:500px">
                <h3><a href="Admin.jsp">返回管理界面</a></h3>
            </div>
        <%
            List<Member> list=new MemberDao().getMemberByKeyword(request.getParameter("keyword"));
        %>
        <table>
            <tr><th>姓名</th><th>性别</th><th>手机号</th></tr>
            <%
                for(Member member:list){
            %>
            <tr><td><%=member.getName()%></td><td><%=member.getGender()%></td>
                <td><%=member.getPhone()%></td>
                <td><a href="MemberInfo.jsp?userid=<%=member.getId()%>">查看详情</a></td>
                <%
                    if(member.getIsForbid()==false){
                %>
                <td><a href="fus?userid=<%=member.getId()%>&type=1">禁用此用户</a></td></tr>
            <%
                }else{
            %>
                <td><a href="fus?userid=<%=member.getId()%>&type=2">解禁用户</a></td></tr>
        
            <%
                    }
                }
            %>
        </table>
    </body>
</html>
